/*
 *  AMPStoryNodeID.cpp
 *  AMPlugin
 *
 *  Created by Vu Tiet on 8/10/12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */


#include "VCPlugInHeaders.h"

// Interface includes:
#include "IPMStream.h"

// Project includes:
#include "AMPStoryNodeID.h"
/**
 */

/* Compare
 */
int32 AMPStoryNodeID::Compare(const NodeIDClass* nodeID) const
{
	const AMPStoryNodeID* oneNode = static_cast<const AMPStoryNodeID*>(nodeID);
	ASSERT(nodeID);
	
    //return fName.Compare(kTrue, oneNode->GetName());
	return fId.Compare(kTrue, oneNode->GetId());
}


/* Clone
 */
NodeIDClass* AMPStoryNodeID::Clone() const
{
	//return new AMPStoryNodeID(this->GetName());
	return new AMPStoryNodeID(this->GetId(), this->GetName());
}


/* Read
 */
void AMPStoryNodeID::Read(IPMStream* stream)
{
	fName.ReadWrite(stream);
}


/* Write
 */
void AMPStoryNodeID::Write(IPMStream* stream) const
{
	(const_cast<AMPStoryNodeID*>(this)->fName).ReadWrite(stream);
}

//	end, File:	AMPStoryNodeID.cpp
